package maple.thelittleredbook.content.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

/**
 * 内容实体类
 */
@Data
@TableName("contents")
public class Content {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @TableField("content_type")
    private String contentType;

    @TableField("text_content")
    private String textContent;

    @TableField("title")
    private String title;

    @TableField("cover_url")
    private String coverUrl;

    @TableField("upload_status")
    private String uploadStatus;

    @TableField("like_count")
    private Integer likeCount;

    @TableField("comment_count")
    private Integer commentCount;

    @TableField("view_count")
    private Integer viewCount;

    @TableField("is_published")
    private Boolean isPublished;

    @TableField("is_es_indexed")
    private Boolean isEsIndexed;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}